#ifndef ROUNDWIDGET_H
#define ROUNDWIDGET_H

#include <QWidget>
#include <QPainter>

namespace Ui {
class RoundWidget;
}

class RoundWidget : public QWidget
{
    Q_OBJECT

public:
    explicit RoundWidget(QWidget *parent = nullptr);
    ~RoundWidget();
signals:
    void signalTimeOut(int);

public slots:
    void slotPlayerChangeed(bool current_player);
    void slotTimeOut();
    void slotNewGame();
    void slotGameOver(int);

protected:
    void paintEvent(QPaintEvent *event);
private:
    Ui::RoundWidget *ui;

    // 定义棋子与玩家
    bool WHITE_PALYER;  // 白色玩家
    bool BLACK_PLAYER;
    static const int WHITE_PIECE = -1;   // 白棋
    static const int BLACK_PIECE = 1;   // 黑棋
    int current_chess;
};

#endif // ROUNDWIDGET_H
